package com.loyal.mwm.handler;

import android.text.TextUtils;
import android.view.View;

import com.loyal.core.helper.ViewHelper;
import com.loyal.mwm.R;
import com.loyal.mwm.base.BaseActivity;
import com.loyal.mwm.base.BaseClickHandler;
import com.loyal.mwm.databinding.ActivityMainBinding;
import com.loyal.mwm.util.UIHandler;

public class MainHandler extends BaseClickHandler<ActivityMainBinding> {
    public MainHandler(BaseActivity baseActivity, ActivityMainBinding binding) {
        super(baseActivity, binding);
    }

    public void onClick(View view) {
        ViewHelper.hideKeyBoard(view);
        UIHandler.delay2Enable(view);
        if (view.getId() == R.id.text_weather) {
            if (binding.getWeather() != null && !TextUtils.isEmpty(binding.getWeather().trim())) {
                //intentBuilder.putExtra("city", PreferUtil.getString(activity.getApplicationContext(), StrImpl.KEY_CITY, StrImpl.defaultCity));
                //activity.startActivityForResultByAct(WeatherActivity.class, IntImpl.reqCodeWeather);
            }
        }
    }
}
